
    $('#LoginButton').click(function (){


        $.ajax(
            {
                type: "get",
                url: "/getUseList",
                dataType: "json",

                success: function (res) {
                    var list = res.data.users;
                    for (var i = 0; i < list.length; i++) {
                        if ($("#useName").val() == list[i].userName && $("#passWord").val() == list[i].userPassword) {
                            mdui.snackbar({
                                message: '登陆成功',
                                timeout: 3000,
                                onClosed: function () {
                                    $(location).attr("href", "index.html");
                                }
                            });


                            console.log(list[i].userName + "||" + list[i].userPassWord);
                        } else {

                            mdui.snackbar({
                                message: '登陆失败',
                                timeout: 3000,
                                onClosed: function () {
                                    window.location.reload();
                                }
                            });
                        }
                    }

                }



            }

        );
    });


